package cn.com.demo.tp01.constomer;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(
        bindings = @QueueBinding(
                value = @Queue(value="demo.topic.queue",autoDelete="false"),
                exchange=@Exchange(value="demo.topic",type= ExchangeTypes.TOPIC),
                key="*.log.info"
        )
)

public class TopicConstomer {
    @RabbitHandler
    public void re(String message){
        System.out.println("TopicConstomer Received:" + message);
    }
}
